﻿using System;
using System.Diagnostics;

namespace WinHooksNET.Helpers
{
    internal static class Tools
    {
        public static IntPtr GetCurrentModuleHandle()
        {
            Process currentProcess = Process.GetCurrentProcess();
            ProcessModule module = currentProcess.MainModule;
            return Helpers.PInvokeCode.GetModuleHandle(module.ModuleName);
        }

        public static Structs.MouseCoords ConvertPointToMouseCoords(Helpers.PInvokeCode.WinApiPoint point)
        {
            Structs.MouseCoords coords = new Structs.MouseCoords()
            {
                X = point.x,
                Y = point.y
            };

            return coords;
        }
    }
}
